import type { AddOrderResult, OrderListResult, UpdateOrderStatus } from '@/api/modules/order/order.type.ts'
import request from '@/api'

const orderService = {
  addOrder: (data: AddOrderResult) => {
    return request.post('/ucar/order/addOrder', data)
  },
  mobileList: (data: OrderListResult) => {
    return request.post('/ucar/order/mobileList', data)
  },
  detail: (orderUuid: string) => {
    return request.post('/ucar/order/detail', { orderUuid })
  },
  updateOrderStatus: (data: UpdateOrderStatus) => {
    return request.post('/ucar/order/updateOrderStatus', data)
  },
  uploadOrderSign: (data: any) => {
    return request.post('/ucar/order/uploadOrderSign', data)
  },
  orderUseUcarQueryApi: (data: any) => {
    return request.post('/ucar/order/orderUseUcarQueryApi', data)
  },
  getReportHtml: (data: any) => {
    return request.request('POST', '/ucar/order/getReportHtml', {
      data,
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      },
    })
  },
  iframeGetReport: (data: any) => {
    return request.get('/ucar/proxy/iframeGetReport', data)
  },
  proxyGetReport: (data: any) => {
    return request.get('/ucar/proxy/proxyGetReport', data)
  },
  reportUnReadMinusOne: (data: any) => {
    return request.post('/ucar/order/reportUnReadMinusOne', data)
  },
}
export default orderService
